from wechaty import Wechaty, Message, Room, Contact
import pymysql
import asyncio, os
import datetime, calendar
import time, re, zhconv
from apscheduler.schedulers.asyncio import AsyncIOScheduler
# uos
# os.environ["WECHATY_PUPPET_SERVICE_ENDPOINT"] = "127.0.0.1:8089"
# os.environ["WECHATY_PUPPET_SERVICE_TOKEN"] ="f47ea95c-01a0-4043-ac24-64c65c558c9f"
# os.environ["WECHATY_PUPPET_WECHAT_PUPPETEER_UOS"] = "true"

# padlocal
os.environ['WECHATY_PUPPET_SERVICE_TOKEN']='insecure_f47ea95c-01a0-4043-ac24-64c65c558c9f'
os.environ['WECHATY_PUPPET']='wechaty-puppet-padlocal'
os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT']='127.0.0.1:8089'

# 数据库

class MyBot(Wechaty):
    async def on_message(self, msg: Message) -> None:
        if msg.is_self():
            return
        print('pppp')


async def main():
    bot = MyBot()
    await bot.start()

asyncio.run(main())
# asyncio.run(MyBot().start())